<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
  <meta charset="UTF-8">
  <title>部署平台</title>
  <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
  <link href="favicon.ico" mce_href="favicon.ico" rel="bookmark" type="image/x-icon" />
  <link href="favicon.ico" mce_href="favicon.ico" rel="icon" type="image/x-icon" />
  <link href="favicon.ico" mce_href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <!--自定义css-->
  <link href="/css/common.css" rel="stylesheet" type="text/css" />
  <!-- Bootstrap 3.3.2 -->
  <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  <!-- Font Awesome Icons -->
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
  <!-- Ionicons -->
  <!--<link href="http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css" rel="stylesheet" type="text/css" />-->
  <link href="/third_part_resources/ionicons.min.css" rel="stylesheet" type="text/css" />
  <!-- DATA TABLES -->
  <link href="/plugins/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
  <!-- Theme style -->
  <link href="/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
  <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
        page. However, you can choose any other skin. Make sure you
        apply the skin class to the body tag so the changes take effect.
  -->
  <link href="/dist/css/skins/skin-blue.min.css" rel="stylesheet" type="text/css" />

  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
  <![endif]-->
  <!-- jQuery 2.1.3 -->
  <script src="/plugins/jQuery/jQuery-2.1.3.min.js"></script>

</head>
<body class="skin-blue layout-boxed">

<div class="wrapper">

  <!-- Main Header -->
  <header class="main-header">

    <!-- Logo -->
    <a href="index2.html" class="logo"><b>OpsPlatform</b></a>

    <!-- Header Navbar -->
    <nav class="navbar navbar-static-top" role="navigation">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
      <!-- Navbar Right Menu -->
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <!-- Tasks: style can be found in dropdown.less -->
          <li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-play"></i>
              <span class="label label-warning" id="running_num"></span>
            </a>
            <ul class="dropdown-menu">
              <li class="header" id="running_describer"></li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li id="running_example" style="display: none"><!-- Task item -->
                    <a href="#">
                      <h3>
                        <small class="pull-right"></small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                        </div>
                      </div>
                    </a>
                  </li><!-- end task item -->
                </ul>
              </li>
              <li class="footer">
                <!--<a href="#">View all tasks</a>-->
              </li>
            </ul>
          </li>
          <!-- Messages: style can be found in dropdown.less-->
          <li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-check-square-o"></i>
              <span class="label label-success" id="success_num"></span>
            </a>
            <ul class="dropdown-menu">
              <li class="header" id="success_describer"></li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li id="success_example" style="display: none"><!-- Task item -->
                    <a href="#">
                      <h3>
                        <small class="pull-right"></small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-green" style="width: 100%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                        </div>
                      </div>
                    </a>
                  </li><!-- end task item -->
                </ul>
              </li>
              <li class="footer">
                <!--<a href="#">View all tasks</a>-->
              </li>
            </ul>
          </li>
          <!-- Notifications: style can be found in dropdown.less -->
          <li class="dropdown tasks-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <i class="fa fa-exclamation-circle"></i>
              <span class="label label-danger" id="failure_num"></span>
            </a>
            <ul class="dropdown-menu">
              <li class="header" id="failure_describer"></li>
              <li>
                <!-- inner menu: contains the actual data -->
                <ul class="menu">
                  <li id="failure_example" style="display: none"><!-- Task item -->
                    <a href="#">
                      <h3>
                        <small class="pull-right"></small>
                      </h3>
                      <div class="progress xs">
                        <div class="progress-bar progress-bar-red" style="width: 100%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
                        </div>
                      </div>
                    </a>
                  </li><!-- end task item -->
                </ul>
              </li>
              <li class="footer">
                <!--<a href="#">View all tasks</a>-->
              </li>
            </ul>
          </li>
          <!-- User Account Menu -->
          <li class="dropdown user user-menu">
            <!-- Menu Toggle Button -->
            <a href="#" class="dropdown-toggle">
              <!-- The user image in the navbar-->
              <!--<img src="dist/img/user2-160x160.jpg" class="user-image" alt="User Image"/>-->
              <!-- hidden-xs hides the username on small devices so only the image appears. -->
              <span class="hidden-xs"><%= Time.new.strftime('%Y-%m-%d') %></span>
            </a>
          </li>
        </ul>
      </div>
    </nav>
  </header>
  <!-- Left side column. contains the logo and sidebar -->
  <aside class="main-sidebar">

    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">

      <div class="user-panel">
        <div class="pull-left info">
          <p>
            <i class="fa fa-circle text-success"></i> <%= current_user.username.capitalize%>
          </p>
        </div>
        <div class="pull-right info">
          <p>
            <a href="/logout">注销</a>
          </p>
        </div>
      </div>
      <!-- search form (Optional) -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="Search..."/>
              <span class="input-group-btn">
                <button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
              </span>
        </div>
      </form>
      <!-- /.search form -->

      <!-- Sidebar Menu -->
      <ul class="sidebar-menu">
        <li class="header"></li>
        <!-- Optionally, you can add icons to the links -->
        <li id="app_index"><a href="<%= root_path %>"><span>应用部署</span></a></li>
        <li id="app_history"><a href="<%= deploy_history_path %>"><span>应用部署历史</span></a></li>
        <li id="sql_order"><a href="<%= sql_order_path %>"><span>数据库上线</span></a></li>
        <li id="sql_history"><a href="<%= sql_history_path %>"><span>数据库上线历史</span></a></li>
      </ul>
    </section>
  </aside>


<%= yield %>

  <!-- Main Footer -->
  <footer class="main-footer">
    <!-- To the right -->
    <div class="pull-right hidden-xs">
      有任何改进建议，随时联系运维部门
    </div>
    <!-- Default to the left -->
    <strong>Copyright &copy; 2015 <a href="http://www.yazuo.com">雅座</a>.</strong> All rights reserved.
  </footer>

</div><!-- ./wrapper -->


<!-- REQUIRED JS SCRIPTS -->
<!-- Bootstrap 3.3.2 JS -->
<script src="/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<!-- DATA TABES SCRIPT -->
<script src="/plugins/datatables/jquery.dataTables.js" type="text/javascript"></script>
<script src="/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<!-- SlimScroll -->
<script src="/plugins/slimScroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<!-- FastClick -->
<script src='/plugins/fastclick/fastclick.min.js'></script>
<!-- AdminLTE App -->
<script src="/dist/js/app.min.js" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<!--<script src="../../dist/js/demo.js" type="text/javascript"></script>-->

<script src="/javascript/history_quick_index.js" type="text/javascript"></script>

<!-- page script -->
<script type="text/javascript">
    $(function () {
        //左侧导航激活样式
        str = window.location.pathname
        switch (str) {
            case String(str.match('^<%= deploy_history_path %>')):
                $('#app_history').addClass('active')
                break;
            case String(str.match('^<%= sql_order_path %>.*')):
                $('#sql_order').addClass('active')
                break;
            case String(str.match('^<%= sql_history_path %>.*')):
                $('#sql_history').addClass('active')
                break;
            default:
                $('#app_index').addClass('active')
                break;
        }
    });

</script>


</body>
</html>
